package com.twu.biblioteca;

import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * User: root
 * Date: 6/28/13
 * Time: 12:54 AM
 * To change this template use File | Settings | File Templates.
 */
public class CommandParser {

    private static HashMap<String,Command> content = new HashMap<String, Command>();

    static {
        content.put("a", new CommandListAllBooks());
        content.put("q", new CommandQuit());
        content.put("r", new CommandReserve());
        content.put("v", new CommandViewMembershipDetails());
<<<<<<< HEAD
        content.put("m", new CommandListAllMovies());
        content.put("l", new CommandLogin());
=======
>>>>>>> 35da6d08a71d87cd8b6d18bacb866f3b865fbf23
    }

    public CommandParser() {

    }

    public static Command getCommand(String text) {
            return content.get(text);
    }
}
